package com.dailyblue.java.project.power.service;

import com.dailyblue.java.project.power.bean.JsonResult;
import com.dailyblue.java.project.power.bean.Powers;
import com.dailyblue.java.project.power.bean.Users;

import javax.servlet.ServletContext;
import java.util.List;

public interface UsersService {
    JsonResult<Users> login(String userName, String password, String sessionId, ServletContext application);
    JsonResult<String> uniqueName(String name);
    JsonResult<Users> saveUser(Users user, String sessionId, ServletContext application);
    int checkUsersHasPermission(int uid, String url);
    void updateUserByRole(int rid, int uid);
    JsonResult<List<Users>> findAllUsers();
    JsonResult<List<Powers>> updateUserPower(int uid, int[] pid);

}
